/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import net.minecraft.client.particle.Particle;
/*     */ import net.minecraft.client.renderer.BufferBuilder;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.util.math.Vec3d;
/*     */ import net.minecraft.world.World;
/*     */ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ 
/*     */ 
/*     */ @EventBusSubscriber(modid = "dragoncore")
/*     */ public class cca
/*     */   extends Particle
/*     */ {
/*  16 */   private static final int[] t = new int[] { 0, 21, 33, 54, 75, 96, 118, 139, 158, 180, 200 };
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private final int d;
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private int z;
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private int i;
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private float w;
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private float q;
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   private final String g;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public cca(int i, int j, World world, double d1, double d2, double d3, double d4, double d5, double d6, float f) {
/*  54 */     super(world, d1, d2, d3, 0.0D, 0.0D, 0.0D);
/*  55 */     this.z = i * 25;
/*  56 */     this.d = 25;
/*     */     
/*  58 */     this.field_187122_b = world;
/*  59 */     this.field_190017_n = false;
/*  60 */     this.field_187129_i = -Math.random() * 0.2D + 0.1D;
/*  61 */     this.field_187130_j = 0.10000000149011612D;
/*  62 */     this.field_187131_k = -Math.random() * 0.2D + 0.1D;
/*  63 */     this.field_70545_g = 0.1F;
/*  64 */     this.field_70544_f = 0.0F;
/*  65 */     this.q = 0.0F;
/*  66 */     this.field_70547_e = (int)(Math.random() * 30.0D + 30.0D);
/*  67 */     this.field_70547_e *= (int)f;
/*     */     
/*  69 */     this.g = String.valueOf(j);
/*     */     
/*  71 */     for (int k = 0; k < this.g.length(); k++) {
/*  72 */       this.i += v(this.g.charAt(k));
/*     */     }
/*     */     
/*  75 */     func_189213_a();
/*     */   }
/*     */   
/*     */   public void func_189213_a() {
/*  79 */     this.field_187123_c = this.field_187126_f;
/*  80 */     this.field_187124_d = this.field_187127_g;
/*  81 */     this.field_187125_e = this.field_187128_h;
/*  82 */     if (this.field_70546_d++ >= this.field_70547_e) {
/*  83 */       func_187112_i();
/*     */     }
/*  85 */     if (this.field_187122_b == null) {
/*     */       return;
/*     */     }
/*  88 */     this.q = this.field_70544_f;
/*  89 */     if (this.field_70546_d < this.field_70547_e / 3) {
/*  90 */       this.field_70544_f = this.field_70546_d / this.field_70547_e / 3.0F * 0.325F;
/*     */     }
/*  92 */     this.field_187129_i *= 0.93D;
/*  93 */     this.field_187130_j -= 0.04D * this.field_70545_g;
/*  94 */     this.field_187131_k *= 0.93D;
/*  95 */     func_187110_a(this.field_187129_i, this.field_187130_j, this.field_187131_k);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public int func_189214_a(float f) {
/* 106 */     return 15728640;
/*     */   }
/*     */   
/*     */   public boolean func_187111_c() {
/* 110 */     return true;
/*     */   }
/*     */   
/*     */   public int func_70537_b() {
/* 114 */     return 2;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_180434_a(BufferBuilder bufferBuilder, Entity entity, float f1, float f2, float f3, float f4, float f5, float f6) {
/* 121 */     if (this.field_187122_b == null) {
/*     */       return;
/*     */     }
/*     */     
/* 125 */     float f7 = (float)(this.field_187123_c + (this.field_187126_f - this.field_187123_c) * f1 - Particle.field_70556_an);
/* 126 */     float f8 = (float)(this.field_187124_d + (this.field_187127_g - this.field_187124_d) * f1 - Particle.field_70554_ao);
/* 127 */     float f9 = (float)(this.field_187125_e + (this.field_187128_h - this.field_187125_e) * f1 - Particle.field_70555_ap);
/*     */     
/* 129 */     float f10 = this.field_70544_f + (this.field_70544_f - this.q) * f1;
/*     */     
/* 131 */     int i = func_189214_a(f1);
/* 132 */     int j = i >> 16 & 0xFFFF;
/* 133 */     int k = i & 0xFFFF;
/*     */     
/* 135 */     float f11 = -(this.i / this.d * f10 * 2.0F + (this.g.length() - 1) * f10 * -0.4F) / 2.0F;
/* 136 */     boolean bool = GL11.glIsEnabled(2896);
/*     */     
/* 138 */     GL11.glEnable(2896);
/* 139 */     hw.v("damagepic.png");
/* 140 */     for (int m = 0; m < this.g.length(); m++) {
/*     */       
/* 142 */       float f12 = (m % 2 == 0) ? (f10 * 0.1F) : (-f10 * 0.1F);
/* 143 */       float f13 = f10;
/* 144 */       float f14 = f10;
/* 145 */       char c = this.g.charAt(m);
/* 146 */       int n = v(c);
/* 147 */       if (n < this.d) {
/* 148 */         f13 = (float)(f13 * n / this.d);
/*     */       } else {
/* 150 */         f14 = (float)(f14 * this.d / n);
/*     */       } 
/* 152 */       float f15 = t[c - 48] / 256.0F;
/* 153 */       float f16 = f15 + n / 256.0F;
/* 154 */       float f17 = this.z / 256.0F;
/* 155 */       float f18 = f17 + this.d / 256.0F;
/*     */       
/* 157 */       Vec3d[] arrayOfVec3d = { new Vec3d((-f2 * f13 - f5 * f14), (-f3 * f14), (-f4 * f13 - f6 * f14)), new Vec3d((-f2 * f13 + f5 * f14), (f3 * f14), (-f4 * f13 + f6 * f14)), new Vec3d((f2 * f13 + f5 * f14), (f3 * f14), (f4 * f13 + f6 * f14)), new Vec3d((f2 * f13 - f5 * f14), (-f3 * f14), (f4 * f13 - f6 * f14)) };
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */       
/* 163 */       Vec3d vec3d = new Vec3d((-f2 * (f11 + f13) + f5 * f12), (f3 * f12), (-f4 * (f11 + f13) + f6 * f12));
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */       
/* 170 */       bufferBuilder.func_181662_b(f7 + (arrayOfVec3d[0]).field_72450_a + vec3d.field_72450_a, f8 + (arrayOfVec3d[0]).field_72448_b + vec3d.field_72448_b, f9 + (arrayOfVec3d[0]).field_72449_c + vec3d.field_72449_c)
/* 171 */         .func_187315_a(f16, f18).func_181666_a(this.field_70552_h, this.field_70553_i, this.field_70551_j, this.field_82339_as)
/* 172 */         .func_187314_a(j, k).func_181675_d();
/*     */       
/* 174 */       bufferBuilder.func_181662_b(f7 + (arrayOfVec3d[1]).field_72450_a + vec3d.field_72450_a, f8 + (arrayOfVec3d[1]).field_72448_b + vec3d.field_72448_b, f9 + (arrayOfVec3d[1]).field_72449_c + vec3d.field_72449_c)
/* 175 */         .func_187315_a(f16, f17).func_181666_a(this.field_70552_h, this.field_70553_i, this.field_70551_j, this.field_82339_as)
/* 176 */         .func_187314_a(j, k).func_181675_d();
/*     */       
/* 178 */       bufferBuilder.func_181662_b(f7 + (arrayOfVec3d[2]).field_72450_a + vec3d.field_72450_a, f8 + (arrayOfVec3d[2]).field_72448_b + vec3d.field_72448_b, f9 + (arrayOfVec3d[2]).field_72449_c + vec3d.field_72449_c)
/* 179 */         .func_187315_a(f15, f17).func_181666_a(this.field_70552_h, this.field_70553_i, this.field_70551_j, this.field_82339_as)
/* 180 */         .func_187314_a(j, k).func_181675_d();
/*     */       
/* 182 */       bufferBuilder.func_181662_b(f7 + (arrayOfVec3d[3]).field_72450_a + vec3d.field_72450_a, f8 + (arrayOfVec3d[3]).field_72448_b + vec3d.field_72448_b, f9 + (arrayOfVec3d[3]).field_72449_c + vec3d.field_72449_c)
/* 183 */         .func_187315_a(f15, f18).func_181666_a(this.field_70552_h, this.field_70553_i, this.field_70551_j, this.field_82339_as)
/* 184 */         .func_187314_a(j, k).func_181675_d();
/*     */       
/* 186 */       f11 += 2.0F * f13 + f10 * -0.4F;
/*     */     } 
/* 188 */     if (!bool) {
/* 189 */       GL11.glDisable(2896);
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   public void func_70536_a(int i) {
/* 195 */     if (func_70537_b() > 3) {
/* 196 */       throw new RuntimeException("Invalid call to Particle.setMiscTex");
/*     */     }
/* 198 */     this.field_94054_b = i % 16;
/* 199 */     this.field_94055_c = i / 16;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\cca.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */